﻿using System;
using System.Linq;
using System.Linq.Expressions;

namespace WSPay.Common.Data
{
    public interface IRepository<TEntity>
    {
        TEntity GetById(object id);

        void Update(TEntity entity);

        void Delete(object id);

        void Delete(TEntity entity);

        void Insert(TEntity entity);

        int Count(Expression<Func<TEntity, bool>> predicate);
        
        IQueryable<TEntity> Query();

        IQueryable<TEntity> ReadQuery();
    }
}
